package com.yang.booking.controller;

import com.yang.booking.service.RoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class RoomController {

    @Autowired
    private RoomService roomService;

    @PostMapping("/provider/room/insertRoom")
    public Map<String, Object> insertRoom(@RequestParam(name = "storeId") String storeId,
                                          @RequestParam(name = "name") String name
    ){
        return roomService.insertRoom(storeId, name);
    }
}
